package com.tedu.egmvc3.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AddressController {

    @RequestMapping("/address/add")
    @ResponseBody
    public String add(String receiver,String address,String email,String mobile,String tag){
        System.out.println("添加----收件人:"+receiver+",地址:"+address+",邮箱:"+email+",手机号:"+mobile+",标签:"+tag);
        return "添加成功！收件人:"+receiver+",地址:"+address+",邮箱:"+email+",手机号:"+mobile+",标签:"+tag;
    }

    @RequestMapping("/address/list")
    @ResponseBody
    public String list(){
        return "查询成功！";
    }

    @RequestMapping("/address/delete")
    @ResponseBody
    public String delete(String id){
        System.out.println("id:"+id);
        return "删除成功！id:"+id;
    }

    @RequestMapping("/address/update")
    @ResponseBody
    public String update(String receiver,String address,String email,String mobile,String tag){
        System.out.println("修改----收件人:"+receiver+",地址:"+address+",邮箱:"+email+",手机号:"+mobile+",标签:"+tag);
        return "修改成功！收件人:"+receiver+",地址:"+address+",邮箱:"+email+",手机号:"+mobile+",标签:"+tag;
    }
}
